package com.gzdh.dishrecognition.emu;

public enum PeripheralDeviceEmus {
    defaultType(0, "默认模式"),
    cloudQrAndReadCard(1, "QP台式扫码盒");

    private int value;

    private String name;

    private PeripheralDeviceEmus(int v, String name) {
        this.value = v;
        this.name = name;
    }

    // 根据value返回枚举类型,主要在switch中使用
    public static PeripheralDeviceEmus getByValue(int value) {
        for (PeripheralDeviceEmus code : values()) {
            if (code.getValue() == value) {
                return code;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
